package com.ljd.service;

import com.ljd.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ljd.entity.frontVo.CourseFrontVo;
import com.ljd.entity.frontVo.CourseWebVo;
import com.ljd.entity.page.PageResponse;
import com.ljd.entity.vo.CourseInfoVo;
import com.ljd.entity.vo.CoursePublishVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author ljd
 * @since 2021-12-10
 */
public interface EduCourseService extends IService<EduCourse> {

    String saveCourseInfo(CourseInfoVo courseInfoVo);

    void updateCourseInfo(CourseInfoVo courseInfoVo);

    CourseInfoVo getCourseInfo(String courseId);

    CoursePublishVo getPublishCourseInfo(String courseId);

    void publishCourse(String courseId);

    PageResponse<EduCourse> listByCondition(Integer current, Integer pageSize, String title, String status);

    void deleteCourse(String courseId);

    /**
     * 前台分页查询
     * @param current
     * @param pageSize
     * @param courseFrontVo
     * @return
     */
    Map<String, Object> getCourseByCondition(Long current, Long pageSize, CourseFrontVo courseFrontVo);

    /**
     * 前台查询课程详情基本信息
     * @param courseId
     * @return
     */
    CourseWebVo getCourseWebVoById(String courseId);
}
